'''
视频源管理页面相关功能测试
'''
from Lib.base.keywords import KeyWords
from selenium.webdriver.common.by import By
from Lib.common.common_function import *
from Lib.base.page_object.login_page import LonginPage


class Resources(KeyWords):
    url = KeyWords.url + 'video-resources'

    # 新建排班s
    def add_resource(self):
        data = get_data_by_yaml(get_path() + r'\Data\element_data\video_resources\create_group.yaml')
        element_operation(self, data[0]['data'])


if __name__ == '__main__':
    try:
        driver = choose_browser()
        L = LonginPage(driver)
        L.login('kobeAdmin002', 'kobe8888')
        case = Resources(driver)
        case.add_resource()
        driver.quit()
    except Exception as e:
        # driver.quit()
        raise e
